package com.singfan.common.nosql.mongo.provider;

import com.mongodb.MongoClient;
import com.singfan.common.nosql.mongo.MongoContext;

/**
 * Author: hansonghe
 * Date: 2015-08-21 10:12
 * Desc:
 */
public class SimpleMongoClientProvider extends MongoClientProvider {
    private MongoClient mongoClient;

    @Override
    public void init() {
        mongoClient = new MongoClient(MongoContext.getMongoConfigProvider().getHost(), MongoContext.getMongoConfigProvider().getPort());
    }

    @Override
    public MongoClient getMongoClient() {
        return mongoClient;
    }
}
